#import <Foundation/Foundation.h>
#import "XGInitConfig.h"
#import "PayInfo.h"
#import "MissionInfo.h"
#import "VirtualCurrencyGainInfo.h"
#import "ItemGainInfo.h"
#import "RoleInfo.h"
#import "FunCodeInfo.h"
#import "PayResult.h"
#import "PushInfo.h"

@interface SdkBiClient : NSObject
/**
 @brief 开始启动数据统计SDK客户端
 */
+ (BOOL)startStatistic:(XGInitConfig *)config;
/**
 * 用户设置是否同意收集数据，属于最高权限，若用户不同意，则什么数据都不收集
 * @params isUserAuth YES 是同意收集数据 ，NO是不同意收集数据
 */
+ (void)setUserAuthInit:(BOOL)isUserAuth;
+ (BOOL)isUserAuthInit;



/*
*SDK资源释放
*/
+ (void)Release;
+ (void)SetDeviceId:(NSString*) deviceId;
+ (NSString *)GetDeviceId;
+ (void)SetAuthToken:(NSString*)token;
+ (void)OnAccountLogin:(NSString*)account;
+ (void)OnRoleLogin:(RoleInfo*)roleInfo;
+ (void)OnAccountLogout;
+ (void)OnConnect;
+ (void)OnEvent:(NSString *)eventId eventDesc:(NSString *)eventDesc ext:(NSDictionary *)ext;
+ (void)OnEventSync:(NSString *)eventId eventDesc:(NSString *)eventDesc ext:(NSDictionary *)ext;
+ (void)OnRoleLogout;
+ (void)OnRoleLevelUp:(int)roleLevel;
+ (void)OnPayFinish:(PayInfo*)payInfo;
+ (void)OnBtPayOrderCancel:(PayInfo*)payInfo;
+ (void)OnBtPayFail:(PayInfo*)payInfo;
+ (void)OnBtPayOther:(PayInfo*)payInfo;
+ (void)OnBtPayProgress:(PayInfo*)payInfo;
+ (void)OnBtGameXgPay:(NSString*)gameTradeNo;
+ (void)OnMissionBegin:(MissionInfo*)missionInfo;
+ (void)OnMissionSuccess:(MissionInfo*)missionInfo;
+ (void)OnMissionFail:(MissionInfo*)missionInfo;
+ (void)OnMissionEndEvent:(NSString*)missionResult missionInfo:(MissionInfo *)missionInfo;

+ (void)OnVirtualCurrencyGain:(VirtualCurrencyGainInfo*)virtualCurrencyGainInfo;
+ (void)OnVirtualCurrencyGainForPurchased:(VirtualCurrencyGainInfo*)virtualCurrencyGainInfo tradeNo:(NSString *)tradeNo;
+ (void)OnVirtualCurrencyConsume:(VirtualCurrencyGainInfo*)virtualCurrencyGainInfo;

+ (void)OnItemGain:(ItemGainInfo*)itemGainInfo;
+ (void)OnItemConsume:(ItemGainInfo*)itemGainInfo;

+ (void)OnGameLoadResource;
+ (void)OnGameLoadConfig;
+ (void)OnOpenAnnouncement;
+ (void)OnCloseAnnouncement;
+ (void)OnNewUserMission;
+ (void)OnScanResultSuccess:(NSString*)account phoneInfo:(NSDictionary *)phoneInfoDict;
+ (void)OnScanResultFail:(NSString*)msgCode msg:(NSString *)msg  phoneInfo:(NSDictionary *)phoneInfoDict;
+ (void)OnClickDownloadLink:(NSDictionary *)phoneInfoDict;

+ (void)OnRegister:(RoleInfo *)roleInfo;

+ (void)OnSelectProduct:(NSString*)productId;
+ (void)OnGameCreateOrderResult:(NSString*)productId state:(NSString *)state gameTradeNo:(NSString *)gameTradeNo nOrderCreateCode:(NSString *)nOrderCreateCode szOrderCreateMsg:(NSString *)szOrderCreateMsg;

+ (void)OnPrivateFunCodeUse:(FunCodeInfo *)funCodeInfo;
+ (void)OnPublicFunCodeUse:(FunCodeInfo *)funCodeInfo;

+ (void)OnFunCodeUse:(FunCodeInfo *)funCodeInfo scope:(NSString *)scope;
+ (void)AddAttribute:(NSString *)key value:(NSString *)value;
+ (void)RemoveAttribute:(NSString *)key;
+ (void)OnPayFail:(PayInfo *)payInfo payResult:(PayResult *)payResult;
+ (void)OnPayCancel:(PayInfo *)payInfo payResult:(PayResult *)payResult;
+ (void)OnPaySuccess:(PayInfo *)payInfo payResult:(PayResult *)payResult;
+ (void)OnPayOthers:(PayInfo *)payInfo payResult:(PayResult *)payResult;
+ (void)OnScanStart;
+ (void)OnAccountRegister:(NSString *)accountId ext:(NSDictionary *)ext;
+ (void)OnLogin;
+ (void)OnPay;
+ (void)OnInitStart;
+ (void)OnPushMessage:(PushInfo *)pushInfo;
+ (void)OnInitFail:(int)code msg:(NSString *)msg channelCode:(NSString *)channelCode;
+ (void)OnInitSuccess:(int)code msg:(NSString *)msg channelCode:(NSString *)channelCode;
+ (void)OnLoginSuccess:(int)code authInfo:(NSString *)authInfo;
+ (void)OnLoginFail:(int)code msg:(NSString *)msg channelCode:(NSString *)channelCode;
+ (void)OnLoginCancel:(int)code msg:(NSString *)msg;



@end
